package com.guyu.plugin.oss.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * <p> oss服务商 </p>
 *
 * @date 2024/11/29
 */
@Getter
@AllArgsConstructor
public enum SupplierType {

    AMAZON("amazon", "亚马逊"),
    ALIYUN("aliyun", "阿里云"),
    QCLOUD("qcloud", "腾讯云"),
    QINIU("qiniu", "七牛云"),
    HUAWEI("huawei", "华为"),
    MINIO("minio", "MinIO");

    private final String type;
    private final String desc;

    public static SupplierType fromType(String type) {
        for (SupplierType serviceEnum : values()) {
            if (serviceEnum.getType().equals(type)) {
                return serviceEnum;
            }
        }

        return null;
    }

}
